package com.quanxiaoha.weblog.common.enums;

import com.quanxiaoha.weblog.common.exception.BaseExceptionInterface;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ResponseCodeEnum  implements BaseExceptionInterface {

    SYS_ERROR("100","系统错误"),
    SYSE_NOT_FOUND("104","未找到错误"),
    SYS_NOT_VALID("102","参数错误"),
    LOGIN_FAIL("201", "登录失败"),
    USERNAME_OR_PWD_ERROR("203", "用户名或密码错误"),
    UNAUTHORIZED("202","无权访问"),
    FORBIDDEN("204","演示账号仅支持查询操作！"),
    USERNAME_NOT_FOUND("207","该用户不存在"),
    CATEGORY_NAME_IS_EXISTED("20005", "该分类已存在，请勿重复添加！"),
    TAG_NOT_EXISTED("20007", "该标签不存在！"),
    FILE_UPLOAD_FAILED("20008", "文件上传失败！"),
    CATEGORY_NOT_EXISTED("20009", "提交的分类不存在！"),
    ARTICLE_NOT_FOUND("20010", "该文章不存在！"),
    CATEGORY_CAN_NOT_DELETE("20011", "该分类下包含文章，请先删除对应文章，才能删除！"),
    TAG_CAN_NOT_DELETE("20012", "该标签下包含文章，请先删除对应文章，才能删除！"),



    ;


    /**
     * 异常编码
     */
    private String errorCode;
    /**
     * 异常信息
     */
    private String errorMsg;
}
